<html>
<head>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<style type="text/css">
body {
    width: 800px;
    font-family: Arial;
    font-size: 14pt;
    margin-left: 5mm;
    margin-top: 5mm;
}
a {
    font-size: 14pt;
    color: blue;
    text-decoration: none;
}
a:hover, a:active {
    text-decoration: underline;
}
.emphasis {
    font-style: italic;
}
pre {
    font-size: 11pt;
}
h4 {
    font-size: 14pt;
    margin-top: 3mm;
    margin-bottom: 0mm;
}
.file {
    font-family: Courier;
    font-weight: bold;
    color: green;
}
li {
    margin-bottom: 2mm;
}
</style>
</head>
<body>
<h1>APA Schedule Converter</h1>
<table cellpadding=8>
<tr>
<td valign=top>
<a href=#intro>Introduction</a><p>
<a href=#install>Installation</a><p>
<a href=#instruct>Instructions</a><p>
<a href=#trouble>Troubleshooting</a><p>
<a href=#contact>Contact</a><p>
<a href=#source>Source</a><p>
<a href=#grook>Billiard Grook</a><p>
</td>
<td valign=top><img src=converter.png></td>
</tr>
</table>
<a name=intro></a>
<h2>Introduction</h2>
This program runs on Windows.  It is free.
<p>
It helps to answer the question that APA members always have:
<p style="margin-left: 10mm">
&ldquo;Where does my team play this week?&rdquo;
<p>
It takes the <a href=042sched.pdf>typical APA schedule</a> which is
very tricky to read and converts it to a collection of
<span class=emphasis>much</span> clearer
<a href=schedules/index.html>HTML tables</a>.
It can also, if you wish, transfer these tables to your APA league web site.
APA members can request weekly email (or text message) reminders of
where their team is playing.
<p>
<p>
This software was not commissioned by the APA nor is it officially
sanctioned by it.  It does, nonetheless, work very well by processing
the schedules produced by the standard APA software
used by all league operators.
<a name=install></a>
<h2>Installation</h2>
Download the application <a href=APA_Sched.msi>here</a>.
It is 4 megabytes in size.  
It is a standard Microsoft installation file.
Double click to install it.
<p>
You will see a desktop icon that looks like a #6 billiard ball.
<img src=6.png height=32>
<a name=instruct></a>
<h2>Instructions</h2>
<ol>
<li>Generate your league's schedules with your APA software as usual.
Put each division in a separate PDF and place the schedules in a
subfolder by themselves.
<li>Launch the application from the desktop icon.
<li>Enter your league name and the league website.
<li>Use the 'Browse' button to navigate to the subfolder of the schedules.<br>
Click on the little plus sign <img src=plus.png> to open a folder.
<li>Click on the 'Convert' button.
The status line (right above the 3 buttons) will tell you
how many schedules it converted.
<li>Choose the 'View' button to view the resulting HTML schedules.
<li>You have three choices for publishing the schedules in the new format:
<h4>Manual</h4>
<ul>
Transfer the schedules yourself manually &ndash;
include all of the <span class=file>.html</span> files
that were generated in the subfolder where you put your PDF schedules.
<p>
</ul>
<h4>FTP</h4>
<ul>
<li>Enter the FTP site, user name and password for your league's website.
<li>Enter a directory on that site to contain the schedules.
This directory would be, for example, 'htdocs/schedules'.
It will be created for you if it does not exist.
This directory is relative to the location where ftp first logs in.
BE CAREFUL that you do not overwrite your home page (in other words ... Do Not Scratch!).
<li>Click on 'Publish'.  The status line will show the progress.
<li>Your converted schedules can be now seen at:
<p>
<ul>
<span class=file>http://www.yourAPAsite.com/schedules</span>
</ul>
</ul>
<h4>External</h4>
<ul>
Leagues that use the standard website provided by the APA will not
have complete FTP access to their site.  There <i>is</i> the ability to upload
HTML files &ndash; but only one at a time &ndash; and this would be very
time-consuming with one schedule file per team. 
<p>
Since it doesn't matter where
on the web the files are located a mechanism is provided here to
freely allocate space on <span class=file>www.apasched.com</span>
for the purpose of hosting the easy-to-read team schedules.
<p>
You first register your league's website
by clicking <a href="http://www.apasched.com/register.html">here</a>.
<p>
The registration process involves choosing a password for publishing
your site's files.   The password you chose is then entered
into the converter software in the &lsquo;Hosting Password&rsquo; field.
<p>
When this one-time registration is complete you then 
just click &rsquo;Publish&rsquo; whenever you want.
If your league's web site is <span class=file>www.yourAPAsite.com</span>
then the web address for your league's schedules will be:
<ul>
<span class=file>http://www.apasched.com/yourAPAsite</span>
</ul>
</ul>
<p>
</ul>
</ul>
<li>Share the web address for the converted schedules with the league members.
Put a link to it at various places on your site.  Tell the members
about the email (or text message) reminders.
<li>Inform the billiard hall owners about the calendar of tallies
for their host site (see the second table at the top of the first page).
This will help them plan for how many tables they'll need to provide
each league match night.
<li>Finally, for APA Schedule Converter Power Users, note that the
6 balls on the left hand side of the pool-table-styled dialog
can be refreshed with control-R.
Why not have some fun?
</ol>
<a name=trouble></a>
<h2>Troubleshooting</h2>
Here we list the few things that can go wrong along with 
possible remedies.
<h4>Converting</h4>
<ul>
<li>
The converter sofware is dependent on the format of the schedule
files produced by the standard APA software. If that format
should change the converter will need to change as well.
It works quite well with the APA software as of June 2010.
<p>
<li>
If a missing or unknown team number is encountered within the schedule, the
converter will display an error message in the status area and stop.
The error needs to be remedied (in the APA software/data) before
the conversion can proceed.
<p>
<li>
When the schedules are in PDF format a problem can sometimes arise.
If a team or host site name is too long it can run into the next column
and make for trouble.  Like this:
<p>
<img src=too_long.png width=800>
<p>
One remedy is to generate the division schedule in MS Excel (xls)
format instead.  The converter program can read this format as well.
<p>
Another remedy is to add a line to the <span class=file>except.txt</span>
file in <span class=file>C:\APA_Sched</span>.
The line should have this format:
<pre>
    team number | team name | host site name | address | city | state | phone
</pre>
Like this:
<pre>
    42911|Sunday Sinners|Pour House (Roy and Teri's)|3925 E Faries Parkway|Decatur|IL|217-330-6292
</pre>
This line in the 'except' file will be used instead of the one
in the PDF schedule.
<a name=contact></a>
<li>If you have some other issue with the conversion
there is a final option.  Temporarily append the letters 'xx' to the league name
and do the conversion. 
This will generate a file in your schedule directory named
<span class=file>debug.txt</span>.  Send this file to
<a href="mailto:reminder@apasched.com">reminder@apasched.com</a>
along with an explanation of the issue.
</ul>
<h4>Publishing</h4>
<ul>
<li>
If you chose &lsquo;External&rsquo; publishing and forgot the
password you provided during the registration process please contact
us at the email address below.
<li>
If you make a small change to only <i>one</i> division you <i>still</i> need
to convert and publish ALL divisions.  If this seems to take a long time
go get a cup of tea and when you return it will be finished.
<li>Sometimes a network issue will make it difficult to publish
all the files in one go.   If, for example, the publishing stops at file
#45,
there <i>is</i> a way to publish again starting in the middle.
Temporarily put &lsquo;45-&rsquo; at the end of the league name
and click on &lsquo;Publish&rsquo;.  The publishing will begin
with file #45.
</ul>
<h2>Contact</h2>
Sahadev Software (Jon Bjornstad, Aruna Mahadevan)<br>
<a href=mailto:reminder@apasched.com>reminder@apasched.com</a><br>
415-246-6499 (Pacific Time Zone).
<a name=source></a>
<h2>Source</h2>
If you are Perl literate you may be interested in the 
<!-- <a target=_blank href=http://code.google.com/p/apasched>source</a> for the program. -->
<a target=_blank href=APA_Sched.pl>source</a> for the program.
<a name=grook></a>
<h2>Billiard Grook</h2>
<ul>
<img src=billiards.png><p>From <a target=_blank href='http://www.leptonica.com/cachedpages/grooks/grooks.html'>Grooks</a> by <a target=_blank href='http://en.wikipedia.org/wiki/Piet_Hein_(Denmark)'>Piet Hein</a>
</ul>
</body>
</html>
